package cn.kai.ums.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName ums_teacher_course
 */
@TableName(value ="ums_teacher_course")
@Data
public class UmsTeacherCourse implements Serializable {
    /**
     * 教师授课自增id
     */
    @TableId(type = IdType.AUTO)
    private Integer teacouId;

    /**
     * 教师id
     */
    private String teacouTeaid;

    /**
     * 教授必修课课程id
     */
    private String teacouClassCouid;

    /**
     * 教授选修课课程id
     */
    private String teacouPublicCouid;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UmsTeacherCourse other = (UmsTeacherCourse) that;
        return (this.getTeacouId() == null ? other.getTeacouId() == null : this.getTeacouId().equals(other.getTeacouId()))
            && (this.getTeacouTeaid() == null ? other.getTeacouTeaid() == null : this.getTeacouTeaid().equals(other.getTeacouTeaid()))
            && (this.getTeacouClassCouid() == null ? other.getTeacouClassCouid() == null : this.getTeacouClassCouid().equals(other.getTeacouClassCouid()))
            && (this.getTeacouPublicCouid() == null ? other.getTeacouPublicCouid() == null : this.getTeacouPublicCouid().equals(other.getTeacouPublicCouid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getTeacouId() == null) ? 0 : getTeacouId().hashCode());
        result = prime * result + ((getTeacouTeaid() == null) ? 0 : getTeacouTeaid().hashCode());
        result = prime * result + ((getTeacouClassCouid() == null) ? 0 : getTeacouClassCouid().hashCode());
        result = prime * result + ((getTeacouPublicCouid() == null) ? 0 : getTeacouPublicCouid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", teacouId=").append(teacouId);
        sb.append(", teacouTeaid=").append(teacouTeaid);
        sb.append(", teacouClassCouid=").append(teacouClassCouid);
        sb.append(", teacouPublicCouid=").append(teacouPublicCouid);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}